<%= render :partial => "admin/tasks/fetch/form.html", :locals => {:scope => {:task => scope[:task],
                                                                             :pipeline_json => @pipeline_json,
                                                                             :artifact_plugin_to_fetch_view => @artifact_plugin_to_fetch_view,
                                                                             :form => scope[:form]}} %>
<script type="text/javascript">
  Util.on_load(function () {
    new TaskEditor.TypeEditor({
      container:          jQuery('.stage_options'),
      switch_control:     jQuery('.pipeline_selector'),
      entry_to_be_hidden: '.stages_option'
    });
    var helper = new TaskEditor.TypeEditor({
      container:          jQuery('.on_cancel_task'),
      switch_control:     jQuery('.on_cancel_type'),
      entry_to_be_hidden: '.task_entry'
    });
    //memory leak
    helper.showHideCheckbox(jQuery('.has_cancel_task'));
  });
</script>
